<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script src="https://open.isigning.cn/sdk/umd/isigning.min.js"></script>
    <!-- 签字板扩展插件，如果需要支持访问硬件签字板SDK则引用，必须安装有签字板SDK.exe程序 -->
    <!-- <script src="https://open.isigning.cn/sdk/umd/isigning.connect-helper.min.js"></script> -->
    <script>
      var aosInstance = null
      window.axLib.AosSign({}, (aos) => {
        aosInstance = aos
        // 设置token，获取方式见上
        aos.setToken('b1cea9ea-0eaf-4f28-82b7-a1e362be8e31')
      })

      function upload(input) {
        var files = Array.prototype.slice
          .apply(input.files)
          .map((file) => ({ file }))
        // 发起签署 参数配置详见下
        aosInstance.startSign({
          files: files,
          isFree: true,
          thirdBizId: 'xxx',
        })
      }
    </script>
    <p>本地上传待签署文件，支持上传多份文件</p>
    <input
      type="file"
      name=""
      multiple
      accept="application/pdf"
      onchange="upload(this)"
      id=""
    />
  </body>
</html>
